package com.company.netease2020;

import java.util.Scanner;

public class Test202002 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while (t-- > 0){
            int n = sc.nextInt();
            int m = sc.nextInt();
            int k  =sc.nextInt();
            int[][] barriers = new int[k][2];
            for (int i = 0; i < k ; i++) {
                barriers[i][0] = sc.nextInt();
                barriers[i][1] = sc.nextInt();

            }
            int c = sc.nextInt();
            int d = sc.nextInt();

            String res = isStoreCan(n,m,barriers,c,d,k);
            System.out.println(res);
        }
    }

    private static String isStoreCan(int n, int m, int[][] barriers, int c, int d,int k) {
        if(k == 0){
            return "YES";
        }

        for(int i = 1;i <= n - c + 1;i++){
            for(int j = 1;j <= m - d + 1;j++){

                int top = j,bottom = j+ d - 1;
                int left = i,right = i + c - 1;
                for(int l = 0;l < k;i++){
                    int x = barriers[l][0];
                    int y = barriers[l][1];
                    if(x >= left && x <= right && y >= top && y <= bottom) {
                        return "NO";
                    }
                }
            }
        }
        return "YES";
    }
}


